import request from '@/utils/request'

/**
 * 车型对比分页查询
 * @param {*} data = {pageNo: 0, pageSize: 0, param: {accidentTypeDictId,storeId,tiltle}}
 */
export function pageList(form, pageSize, currentPage) {
  const data = {
    param: form,
    pageSize: pageSize,
    pageNo: currentPage
  }
  return request.post('/sq/advertising/carpk/page', data)
}

/**
 * 新增车型对比
 * @param {*} data
 */
export function save(data) {
  return request.post('/sq/advertising/carpk/save', data)
}

/**
 * 更新车型对比
 * @param {*} data
 */
export function update(data) {
  return request.put('/sq/advertising/carpk/save', data)
}

/**
 * 删除车型对比
 * @param {*} id
 */
export function deleteById(id) {
  return request.delete(`/sq/advertising/carpk/${id}`)
}

/**
 * 车型对比详情
 * @param {*} id
 */
export function detailById(id) {
  return request.get(`/sq/advertising/carpk/${id}`)
}

